.class Lcom/netease/newsreader/activity/MoreAppActivity$1;
.super Ljava/lang/Object;
.source "MoreAppActivity.java"

# interfaces
.implements Landroid/widget/AdapterView$OnItemClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/netease/newsreader/activity/MoreAppActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ljava/lang/Object;",
        "Landroid/widget/AdapterView$OnItemClickListener;"
    }
.end annotation


# instance fields
.field final synthetic this$0:Lcom/netease/newsreader/activity/MoreAppActivity;


# direct methods
.method constructor <init>(Lcom/netease/newsreader/activity/MoreAppActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 1
    iput-object p1, p0, Lcom/netease/newsreader/activity/MoreAppActivity$1;->this$0:Lcom/netease/newsreader/activity/MoreAppActivity;

    .line 118
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onItemClick(Landroid/widget/AdapterView;Landroid/view/View;IJ)V
    .locals 7
    .parameter
    .parameter "arg1"
    .parameter "position"
    .parameter "arg3"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/widget/AdapterView",
            "<*>;",
            "Landroid/view/View;",
            "IJ)V"
        }
    .end annotation

    .prologue
    .line 123
    .local p1, arg0:Landroid/widget/AdapterView;,"Landroid/widget/AdapterView<*>;"
    invoke-virtual {p1, p3}, Landroid/widget/AdapterView;->getItemAtPosition(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/netease/newsreader/bean/AppInfo;

    .line 125
    .local v0, appinfo:Lcom/netease/newsreader/bean/AppInfo;
    iget-object v4, p0, Lcom/netease/newsreader/activity/MoreAppActivity$1;->this$0:Lcom/netease/newsreader/activity/MoreAppActivity;

    const-string v5, "APPCLICK"

    invoke-virtual {v0}, Lcom/netease/newsreader/bean/AppInfo;->getName()Ljava/lang/String;

    move-result-object v6

    invoke-static {v4, v5, v6}, Lcom/netease/mobileanalysis/MobileAgent;->setEvent(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    .line 127
    const-string v4, "com.netease.apper"

    invoke-virtual {v0}, Lcom/netease/newsreader/bean/AppInfo;->getPackagename()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_0

    .line 128
    const-string v4, "http://3g.163.com/m/android/software/2vbutg.html"

    invoke-static {v4}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v3

    .line 129
    .local v3, uri:Landroid/net/Uri;
    new-instance v2, Landroid/content/Intent;

    const-string v4, "android.intent.action.VIEW"

    invoke-direct {v2, v4, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    .line 130
    .local v2, it:Landroid/content/Intent;
    iget-object v4, p0, Lcom/netease/newsreader/activity/MoreAppActivity$1;->this$0:Lcom/netease/newsreader/activity/MoreAppActivity;

    invoke-virtual {v4, v2}, Lcom/netease/newsreader/activity/MoreAppActivity;->startActivity(Landroid/content/Intent;)V

    .line 144
    :goto_0
    return-void

    .line 133
    .end local v2           #it:Landroid/content/Intent;
    .end local v3           #uri:Landroid/net/Uri;
    :cond_0
    :try_start_0
    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "market://details?id="

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Lcom/netease/newsreader/bean/AppInfo;->getPackagename()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v3

    .line 134
    .restart local v3       #uri:Landroid/net/Uri;
    new-instance v2, Landroid/content/Intent;

    const-string v4, "android.intent.action.VIEW"

    invoke-direct {v2, v4, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    .line 135
    .restart local v2       #it:Landroid/content/Intent;
    iget-object v4, p0, Lcom/netease/newsreader/activity/MoreAppActivity$1;->this$0:Lcom/netease/newsreader/activity/MoreAppActivity;

    invoke-virtual {v4, v2}, Lcom/netease/newsreader/activity/MoreAppActivity;->startActivity(Landroid/content/Intent;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 136
    .end local v2           #it:Landroid/content/Intent;
    .end local v3           #uri:Landroid/net/Uri;
    :catch_0
    move-exception v1

    .line 137
    .local v1, e:Ljava/lang/Exception;
    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "https://market.android.com/details?id="

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Lcom/netease/newsreader/bean/AppInfo;->getPackagename()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v3

    .line 138
    .restart local v3       #uri:Landroid/net/Uri;
    new-instance v2, Landroid/content/Intent;

    const-string v4, "android.intent.action.VIEW"

    invoke-direct {v2, v4, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    .line 139
    .restart local v2       #it:Landroid/content/Intent;
    iget-object v4, p0, Lcom/netease/newsreader/activity/MoreAppActivity$1;->this$0:Lcom/netease/newsreader/activity/MoreAppActivity;

    invoke-virtual {v4, v2}, Lcom/netease/newsreader/activity/MoreAppActivity;->startActivity(Landroid/content/Intent;)V

    goto :goto_0
.end method
